package com.generation.tool.exception;

import com.generation.tool.pojo.enumeration.ExceptionEnum;

public class AppException extends RuntimeException{
    private int code = 500;
    private String msg = "服务器捕获未知异常";

    public AppException(ExceptionEnum exceptionEnum) {
        super();
        this.code = exceptionEnum.getCode();
        this.msg = exceptionEnum.getMsg();
    }

    public AppException(int code, String msg) {
        super();
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }

}
